﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WeiXinPF.Common;

namespace WeiXinPF.Web.UI
{
    /// <summary>
    /// 含有列表的管理界面基类
    /// </summary>
    public class ManageListPage : ManagePage
    {
        protected int TotalCount;
        protected int PageIndex;
        protected int PageSize;

        /// <summary>
        /// 获取每页默认大小
        /// </summary>
        /// <param name="defaultSize"></param>
        /// <returns></returns>
        protected int GetPageSize(int defaultSize)
        {
            int cookiePageSize;
            if (int.TryParse(Utils.GetCookie("product_list_page_size"), out cookiePageSize))
            {
                if (cookiePageSize > 0)
                {
                    return cookiePageSize;
                }
            }
            return defaultSize;
        }
    }
}
